package com.zhisuo.apicenter.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class RubbishOrderRowMapper implements RowMapper<RubbishOrder> {

    @Override
    public RubbishOrder mapRow(ResultSet rs, int rowNum) throws SQLException {
        RubbishOrder rubbishOrder = new RubbishOrder();
        rubbishOrder.setId(rs.getInt("id"));
        rubbishOrder.setCarid(rs.getInt("carid"));
        rubbishOrder.setBoxid(rs.getInt("boxid"));
        rubbishOrder.setBoxcode(rs.getString("boxcode"));
        rubbishOrder.setReceiptuserid(rs.getInt("receiptuserid"));
        rubbishOrder.setReceiptuser_confirmtime(rs.getTimestamp("receiptuser_confirmtime"));
        rubbishOrder.setCreate_time(rs.getTimestamp("create_time"));
        rubbishOrder.setStatus(rs.getInt("status"));
        rubbishOrder.setReceiptuserparkareaid(rs.getInt("receiptuserparkareaid"));
        rubbishOrder.setReceiptuserbuildname(rs.getString("receiptuserbuildname"));
        rubbishOrder.setReceiptuserbuildid(rs.getInt("receiptuserbuildid"));
        rubbishOrder.setReceiptuseraddressid(rs.getInt("receiptuseraddressid"));
        rubbishOrder.setReceiptuserorderstarttime(rs.getTimestamp("receiptuserorderstarttime"));
        rubbishOrder.setReceiptuserorderendtime(rs.getTimestamp("receiptuserorderendtime"));
        rubbishOrder.setOrdertype(rs.getInt("ordertype"));
        rubbishOrder.setReceiptuseraddresscode(rs.getString("receiptuseraddresscode"));
        return rubbishOrder;
    }

}
